package com.tjh.springbootapi.enums;

import com.koala.apiprototype.db.enums.IIntegerEnum;

/**
 * Create by koala on 2020-03-22
 */

public enum GenderEnum implements IIntegerEnum {
    Male(0, "男"),
    Female(1, "女");

    private Integer value;
    private String display;

    private GenderEnum(Integer value, String display) {
        this.value = value;
        this.display = display;
    }

    @Override
    public Integer getValue() {
        return value;
    }

    @Override
    public String getDisplay() {
        return display;
    }

    public static GenderEnum fromValue(Integer value) {
        return IIntegerEnum.fromValue(GenderEnum.class, value);
    }
}